
///| 字符串转C字符串
pub fn c_str(s : String) -> Bytes {
  
  // @encoding.encode(@encoding.UTF8,s) + b"\x00" // 乱码

  // 中文乱码
  let buffer : @buffer.T = @buffer.new()
  @encoding.encode_to(s, buffer, encoding=UTF8)
  buffer.write_byte(0)
  buffer.contents()
}